//
//  NewStockCell.m
//  investevent
//
//  Created by jiangshao on 16/3/11.
//  Copyright © 2016年 com.scj.investevent. All rights reserved.
//

#import "NewStockCell.h"

@implementation NewStockCell

- (void)awakeFromNib {
    // Initialization code
    hssymbolLabel.layer.masksToBounds = YES;
    hssymbolLabel.layer.cornerRadius = 6;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


-(void)setContent:(NSDictionary *)data{
    
    dateLabel.text=[data objectForKey:@"sgrq"];
    nameLabel.text=[data objectForKey:@"zqjc"];
    NSString *sclx=[data objectForKey:@"sclx"];
    if ([sclx isEqualToString:@"深交所中小板"]) {
        hssymbolLabel.text=@"深";
        hssymbolLabel.backgroundColor=[UIColor blueColor];
    }else{
        hssymbolLabel.text=@"沪";
        hssymbolLabel.backgroundColor=themeColor;
    }
    codeLabel.text= [data objectForKey:@"sgdm"];
    sylLabel.text=[data objectForKey:@"fxsyl"];

    wfLabel.text=[data objectForKey:@"wsfx"];;
    zfLabel.text=[data objectForKey:@"fxzs"];;
    fxjLabel.text=[data objectForKey:@"fxj"];;
    sysxLabel.text=[data objectForKey:@"sgsx"];;

    if (![[data objectForKey:@"wsfx"] isEqualToString:@"--"]) {
        wfLabel.text=[NSString stringWithFormat:@"%@万",[data objectForKey:@"wsfx"] ];
    }
    if (![[data objectForKey:@"fxzs"] isEqualToString:@"--"]) {
        zfLabel.text=[NSString stringWithFormat:@"%@万",[data objectForKey:@"fxzs"] ];
    }

    if (![[data objectForKey:@"fxj"] isEqualToString:@"--"]) {
        fxjLabel.text=[NSString stringWithFormat:@"%@元",[data objectForKey:@"fxj"] ];
    }

    if (![[data objectForKey:@"sgsx"] isEqualToString:@"--"]) {
        sysxLabel.text=[NSString stringWithFormat:@"%@万",[data objectForKey:@"sgsx"] ];
    }

}


@end
